"""
while 循环的应用
"""
# 原理：从一数到一百
print("从一数到一百")
i = 0
while i < 100:
    print(i+1)
    i += 1

print("_____________________________________________________________")

# 1+2+3+...=?
print("1+2+3+...=?")
k = 1
sum = 0
while k < 101:
    sum += k
    k += 1
print(f"1+2+3+...+100={sum}")
